<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>确认对话框</title>
</head>
<body>

<script type="text/javascript">
    var flag=confirm("确认要删除此条消息吗?");
    if (flag==true){
        alert("删除成功");
    }else {
        alert("你取消了删除");
    }



</script>

</body>
</html>